package cn.com.taiji.oospub.wechat.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2020-10-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class OrderOfDaynut implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    private String memberName;

    private String idNumber;

    private String memberId;

    private String schoolId;

    private String schoolCode;

    private String resourseName;

    private String resourseId;

    private String resourseCode;

    private Double quantity;

    private String mealName;

    private String mealId;

    private String mealCode;

    private Double hot;

    private String nutCode;

    private LocalDateTime conTime;

    private LocalDateTime createTime;

    private Double price;

    @TableField("resourseNameEn")
    private String resourseNameEn;

    //临时字段
    @TableField(exist = false)
    private List<CourseNutrition> courseNutrition;
    @TableField(exist = false)
    private Map<String, Double> map;
    @TableField(exist = false)
    private String orderCode;
    @TableField(exist = false)
    private String conTimeStr;
    @TableField(exist = false)
    private String hasPay;
    @TableField(exist = false)
    private String actualAmount;
    @TableField(exist = false)
    private List<OrderOfDaynut> list;
    @TableField(exist = false)
    private String totalPrice;
    @TableField(exist = false)
    private String discountAmount;
    @TableField(exist = false)
    private String posNo;
    @TableField(exist = false)
    private Courses courses;
    @TableField(exist = false)
    private String sortTime;
    @TableField(exist = false)
    private String orderType;
    @TableField(exist = false)
    private String orderStatus;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrderOfDaynut ofDaynut = (OrderOfDaynut) o;
        return Objects.equals(orderCode, ofDaynut.orderCode);

    }
}
